@using BlazorApp.Pages.Common.Html
@using k8s.Models
@inherits PageBase

@if (Taints != null)
{
    <HTableColumn Title=@L["Taints"]>

        <Collapse>
            <Panel Key="1">
                <HeaderTemplate>
                    <Badge Count="@Taints.Count"/>
                </HeaderTemplate>
                <ChildContent>
                    <Table TItem="V1Taint" DataSource="Taints"
                           HidePagination="true" PageSize="5000"
                           Size=@TableSize.Small Bordered="true">
                        <AntDesign.Column TData="string" Title="Key" Field="@context.Key"/>
                        <AntDesign.Column TData="string" Title="Value">@context.Value</AntDesign.Column>
                        <AntDesign.Column TData="string" Title="Effect">@context.Effect</AntDesign.Column>
                        <AntDesign.Column TData="DateTime?" Title="Time" Field="@context.TimeAdded"/>

                    </Table>
                </ChildContent>
            </Panel>
        </Collapse>
    </HTableColumn>
}

@code {

    [Parameter] public IList<V1Taint> Taints { get; set; }

}
